<%@ page import="java.util.Date" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
  int a = 1;
  int b = 2;
  int c = a + b;
  Date date = new Date();
  DateFormat dateFormat = new
          SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  String time = dateFormat.format(date);
  // 向当前被构建的网页上输出变量
  out.print(time);
%>
<%--  --%>
c是<%=c%><br/>
<span>名字:${name}</span><br/>
<span>年龄:${age}</span>
</body>
</html>
